list = [1,3,4,5,6,7,8,9,10,12,14,16,18,19,33,44,56,78,99,123,1245]

def binary_search(list,target):
    low = 0
    high = len(list) - 1
    while(low <= high):
        mid = (low + high)//2
        if target == list[mid]:
            return mid
        if list[mid] > target:
            high = mid - 1
        else:
            low = mid + 1
    return None

print(binary_search(list, 56))
print(binary_search(list, 45))
print(binary_search(list, 1245))

